<template>
  <div class="details-content">
    <div class="title">{{info.title}}</div>
    <div class="small-title">
      <div class="data">发布时间：{{info.crt_time}}</div>
      <div class="genre"> 政策类型：经济补贴类</div>
    </div>
    <div class="striping"></div>
    <div class="bottom">
      <div class="text" v-html="info.content" v-if="info.content"></div>
    </div>
  </div>
</template>

<script>
import {getNewsDetailApi} from "@/api/policy";

export default {
  name: "detailss",
  data(){
    return {
      info:{
        title:'',
        crt_time:'',
        content:''
      }
    }
  },
  methods:{
    getDetail() {
      getNewsDetailApi({id:this.id}).then((res) => {
        this.info = res[0];
      }).catch((res) => {
        // console.log(res)
      })
    },
  },
  mounted() {
    this.utils.createParams(this, this.$route.query);
    this.getDetail()
  }
}
</script>

<style lang="scss" scoped>
.details-content{
  width: 800px;
  height: 1100px;
  background-color: #fff;
  box-sizing: border-box;
  border-radius: 20px;
  margin: 30px auto;
  padding: 45px 45px;
  .title{
    font-size: 34px;
    font-weight: bold;
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
  }
  .striping{
    margin-top: 20px;
    width: 100%;
    height: 2px;
    background-color: #D8D8D8;
  }
  .bottom{
    height: 870px;
    box-sizing: border-box;
    padding: 35px 0;
    display: flex;
    overflow-y: scroll;
    .text {
      font-size: 20px;
      text-indent: 2em;
      line-height: 60px;
      color: #434343;
    }
  }
  .small-title {
    display: flex;
    justify-content: space-around;
    font-size: 20px;
    line-height: 60px;
    color: #A7A7A7;
    padding: 0 280px;
    .data{
    }
  }

}
</style>
